<template>
  <div id="" class="star">
      {{str}}
  </div>
</template>
<script>
export default {
  name: "",
  props: ['price'],
  data: () => ({
      str:""
  }),
  created() {
    //do something after creating vue instance
    let price=Math.round(this.price)
    for(let i=0;i<5;i++){
      if(i<price){
        this.str+="★"
      }else{
        this.str+="☆"
      }
    }
  }
}
</script>
<style lang="less" scoped>
.star{
  color: orange;

}
</style>
